<script src="js/product.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready( function() {
	$('select#selectCat').change(function() {
		var catid = $('#selectCat').val();
		var page = 'product_list.php?catid=' + catid;
		$("#rounded-corner").load(page);
	});
});
</script>
<h2>Products </h2> 
<?php 
	include('product_list.php');
?>
<h4> View product in: 
<select id="selectCat">
	<option value="">All</option>
	<?php 
		$catid = $_GET['catid'];
		echo _GetCatList($catid); 
	?>
</select></h4>
<a href="product_f.php?act=add" id="addProduct" class="bt_green"><span class="bt_green_lft"></span><strong>Add new item</strong><span class="bt_green_r"></span></a>
     
     
        <div class="pagination">
        <?php 
			// list display
			foreach ($pages as $page) {
				// If page has a link
				if (isset ($page['url'])) 
				{  
					if($page['url'] != $currentPage) 
					{
		?>
					<a href="<?php echo $page['url']?>"><?php echo $page['text'] ?></a>
		<?php 		
					}
					else
					{ 
		?>
						<a href="<?php echo $page['url']?>">
                            <span class="current"><?php echo $page['text'] ?></span>
                        </a>
                        
			<?php 	}
				}
				// no link - just display the text
				else 
				{
					echo $page['text'];
				}
			} ?>
 </div> 
     
     <h2>&nbsp;</h2>

<div id="popupProduct"></div>
<div id="backgroundPopup"></div>